package com.newvpn.fastbest.zenith.dialog;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.Gravity;
import android.view.Window;
import android.view.WindowManager;

import com.newvpn.fastbest.zenith.R;

public class LoadingDialog extends Dialog {
    public LoadingDialog(Context context) {
        super(context);
        // 设置全屏对话框
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
        getWindow().setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
        getWindow().getAttributes().gravity = Gravity.CENTER; // 居中显示
        setContentView(R.layout.v_dialog_loading); // 使用自定义布局
    }
}